Field of the Invention
The present invention relates to an image processing apparatus and a method of controlling the same, and in particular relates to an image correction technique.
Description of the Related Art
In order to correct image degradation that occurred due to an aberration or diffraction phenomenon in an imaging optical system, processing (image recovery processing) is known in which degradation in an image is corrected using information regarding the optical transfer function (OTF) of the imaging optical system (refer to paragraphs 0008 to 0013 of Japanese Patent Laid-Open No. 2013-51599). Also, letting g(x,y) be the degraded image and f(x,y) be the original image, R(x,y) in the following equation is called an image recovery filter.g(x,y)*R(x,y)=f(x,y)Note that the operator “*” in the above equation represents convolution (a product-sum operation), and (x,y) represents coordinates in the image.
Letting the optical transfer function of the imaging optical system be H(u,v), the image recovery filter is obtained by calculating the inverse Fourier transform of 1/H. Note that (u,v) represents coordinates in a two-dimensional frequency surface, that is to say, represents a frequency. The image recovery filter that is applied to a two-dimensional image is generally a two-dimensional filter that has a tap (cell) corresponding to each pixel in the image.
The extent of image degradation occurring due to aberration or light diffraction in the imaging optical system varies since the influence of aberration and diffraction differs depending on the wavelength of incident light, that is to say differs for each color component, and therefore recovery filters having different characteristics are applied for each color component. Generally, with an image acquired by an imaging element having a pixel size of approximately several μm, the influence of aberration and diffraction extends to several tens of pixels, and therefore the recovery filter needs to be a filter that has many taps in order to be able to refer to a wide range of pixels.
With filter processing that refers to a wide range of pixels, image quality is readily negatively influenced due to the inability to obtain a correct signal value in and around a saturated portion of the input image. With image recovery processing that applies filters having different characteristics for each color component, tinting readily occurs due to a loss of balance between the color components.
As one example of a method of suppressing such effects, Japanese Patent No. 4599398 discloses a technique for suppressing the effect of filter processing according to the brightness of the image area being referred to by the filter.
However, the conventional techniques disclosed in Japanese Patent Laid-Open No. 2013-51599 and Japanese Patent No. 4599398 do not give consideration to maintaining balance in output values among filters. For this reason, it has not been possible to address a problem such as tinting, which occurs in processing that applies separate filters for each component of an image signal as in image recovery processing.